package c.a.a;

import android.content.Context;
import java.lang.ref.WeakReference;
import java.util.concurrent.Callable;

/* compiled from: LottieCompositionFactory */
public class j implements Callable<r<f>> {
    public final /* synthetic */ WeakReference a;
    public final /* synthetic */ Context b;
    public final /* synthetic */ int c;
    public final /* synthetic */ String d;

    public j(WeakReference weakReference, Context context, int i, String str) {
        this.a = weakReference;
        this.b = context;
        this.c = i;
        this.d = str;
    }

    public Object call() throws Exception {
        Context context = (Context) this.a.get();
        if (context == null) {
            context = this.b;
        }
        return g.f(context, this.c, this.d);
    }
}
